﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using WebStudio.Business.Rule;

public partial class CaseList : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!Page.IsPostBack)
        {
            loadData();
        }
    }

    private void loadData()
    {
        anpList.PageSize = 6;
        anpList.CurrentPageIndex = 1;
        anpList.RecordCount = ArticalRule.GetArticalListCount(1, 3, 0);
        rptCaseBind();
    }

    private void rptCaseBind()
    {
        rptCase.DataSource = ArticalRule.GetArticalList(anpList.CurrentPageIndex, anpList.PageSize, anpList.PageCount, anpList.RecordCount, 1, 3, 0);
        rptCase.DataBind();
    }

    protected void anpList_PageChanged(object sender, EventArgs e)
    {
        rptCaseBind();
    }
}
